Ubuntu 16.04
Sponsored Link

Install MySQL
2016/06/16
 
Install MySQL to configure database server.
[1] Install MySQL.
root@www:~#
apt-get -y install mysql-server-5.7
# set MySQL's root password

  +--------------------+ Configuring mysql-server-5.7 +---------------------+
  | While not mandatory, it is highly recommended that you set a password   |
  | for the MySQL administrative "root" user.                               |
  |                                                                         |
  | If this field is left blank, the password will not be changed.          |
  |                                                                         |
  | New password for the MySQL "root" user:                                 |
  |                                                                         |
  | ********_______________________________________________________________ |
  |                                                                         |
  |                                 <Ok>                                    |
  |                                                                         |
  +-------------------------------------------------------------------------+

# connect to MySQL

root@www:~#
mysql -u root -p

Enter password:    
# MySQL root password you set above

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.12-0ubuntu1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# try to display user info

mysql>
select user,host from mysql.user;

+------------------+-----------+
| user             | host      |
+------------------+-----------+
| debian-sys-maint | localhost |
| mysql.sys        | localhost |
| root             | localhost |
+------------------+-----------+
3 rows in set (0.00 sec)

mysql>
exit

Bye
 
Tweet